// Fill out your copyright notice in the Description page of Project Settings.


#include "SpecialFood.h"
#include "SnakeBase.h"

void ASpecialFood::BeginPlay()
{
	Super::BeginPlay();
}

void ASpecialFood::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
}

void ASpecialFood::Interact(AActor* Interactor, bool IsHead)
{
	if (IsHead)
	{
		ASnakeBase* Snake = Cast<ASnakeBase>(Interactor);
		if (!IsValid(Snake)) return;
		Snake->SpeedUpActivate();
		this->Destroy();
	}
}
